<template>
	<view class="xy-goods-grad">
		<view class="item br-10 ovh m-b-30 bg-w" @tap="onLink(item.id)">
			<view class="image ovh"><image :src="item.image" mode="widthFix" /></view>
			<view class="p-lr-15">
				<view class="name m-t-20 ovh">{{item.title}}</view>
				<view class="time-sales ts-26 m-t-10 m-b-20 tc-999">
					<text>已售{{item.total_sales}}</text>
				</view>
				<view class="price-box m-b-20 flex">
					<view class="price ts-36 tb m-r-20 tc-r">¥{{item.price}}</view>
					<view class="line_price ts-26 tdl tc-999">{{item.line_price}}</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		name: "xygoodsGrad",
		props: {
			item: {
				type: Object,
			}
		},
		data() {
			return {

			};
		},
		methods: {
			async onLink(id){
				this.$xyfun.to('/pages/shop/detail?id='+id);
			}
		}
	}
</script>
<style lang="scss">
	.xy-goods-grad{
		.item{
			.name{height: 80rpx;line-height: 40rpx;}
			width: 330rpx;
			.image{
				width: 330rpx;height: 330rpx;
				image{width: 330rpx;min-height: 330rpx;}
			}
			.price-box{line-height: 36rpx;}
		}
	}
</style>
